Simplifying Probabilistic Programs Using Computer Algebra
نویسندگان
چکیده
We transform probabilistic programs to run more efficiently and read more easily, by composing three semantics-preserving transformations: (1) apply the denotational semantics; (2) improve the resulting integral; then (3) invert the denotational semantics. Whereas step 1 is a straightforward transformation from monadic to continuation-passing style, the rest builds on computer algebra: step 2 reorders and performs integrals, and step 3 represents density functions as differential operators.
منابع مشابه
Linear algebra techniques for deciding the correctness of probabilistic programs with bounded resources
An algorithm is outlined for deciding the correctness of (space and time) resource bounded, imperative, probabilistic programs, using linear algebra techniques encoded in the theory of real closed fields. A calculus suitable for reasoning by hand is derived from the proposed encoding. The approach is feasible also for classical, non deterministic, and quantum programs.
متن کاملProbabilistic Demonic Refinement Algebra
We propose an abstract algebra for reasoning about probabilistic programs in a total-correctness framework. In contrast to probablisitic Kleene algebra it allows genuine reasoning about total correctness and in addition to Kleene star also has a strong iteration operator. We define operators that determine whether a program is enabled, has certain failure or does not have certain failure, respe...
متن کاملPSI: Exact Symbolic Inference for Probabilistic Programs
Probabilistic inference is a key mechanism for reasoning about probabilistic programs. Since exact inference is theoretically expensive, most probabilistic inference systems today have adopted approximate inference techniques, which trade precision for better performance (but often without guarantees). As a result, while desirable for its ultimate precision, the practical effectiveness of exact...
متن کاملAlmost Sure Productivity
We define Almost Sure Productivity (ASP), a probabilistic generalization of the productivity condition for coinductively defined structures. Intuitively, a probabilistic coinductive stream or tree is ASP if it produces infinitely many outputs with probability 1. Formally, we define almost sure productivity using a final coalgebra semantics of programs inspired from Kerstan and König. Then, we i...
متن کاملNatively Probabilistic Computation by Vikash
I introduce a new set of natively probabilistic computing abstractions, including probabilistic generalizations of Boolean circuits, backtracking search and pure Lisp. I show how these tools let one compactly specify probabilistic generative models, generalize and parallelize widely used sampling algorithms like rejection sampling and Markov chain Monte Carlo, and solve difficult Bayesian infer...
متن کامل